home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / Graf3D.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  2.3 KB  |  105 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Monday, January 7, 1991 at 6:00 AM
  3.     Graf3D.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.         Copyright Apple Computer, Inc.    1985-1990
  7.         All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Graf3D;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingGraf3D}
  21. {$SETC UsingGraf3D := 1}
  22.  
  23. {$I+}
  24. {$SETC Graf3DIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingQuickdraw}
  27. {$I $$Shell(PInterfaces)Quickdraw.p}
  28. {$ENDC}
  29. {$SETC UsingIncludes := Graf3DIncludes}
  30.  
  31. CONST
  32. radConst = 3754936;
  33.  
  34. TYPE
  35. Point3D = RECORD
  36.     x: Fixed;
  37.     y: Fixed;
  38.     z: Fixed;
  39.     END;
  40.  
  41. Point2D = RECORD
  42.     x: Fixed;
  43.     y: Fixed;
  44.     END;
  45.  
  46. XfMatrix = ARRAY [0..3, 0..3] OF Fixed;
  47.  
  48. Port3DPtr = ^Port3D;
  49. Port3DHandle = ^Port3DPtr;
  50. Port3D = RECORD
  51.     grPort: GrafPtr;
  52.     viewRect: Rect;
  53.     xLeft: Fixed;
  54.     yTop: Fixed;
  55.     xRight: Fixed;
  56.     yBottom: Fixed;
  57.     pen: Point3D;
  58.     penPrime: Point3D;
  59.     eye: Point3D;
  60.     hSize: Fixed;
  61.     vSize: Fixed;
  62.     hCenter: Fixed;
  63.     vCenter: Fixed;
  64.     xCotan: Fixed;
  65.     yCotan: Fixed;
  66.     ident: BOOLEAN;
  67.     xForm: XfMatrix;
  68.     END;
  69.  
  70.  
  71. PROCEDURE InitGrf3d(port: Port3DHandle);
  72. PROCEDURE Open3DPort(port: Port3DPtr);
  73. PROCEDURE SetPort3D(port: Port3DPtr);
  74. PROCEDURE GetPort3D(VAR port: Port3DPtr);
  75. PROCEDURE MoveTo2D(x: Fixed;y: Fixed);
  76. PROCEDURE MoveTo3D(x: Fixed;y: Fixed;z: Fixed);
  77. PROCEDURE LineTo2D(x: Fixed;y: Fixed);
  78. PROCEDURE Move2D(dx: Fixed;dy: Fixed);
  79. PROCEDURE Move3D(dx: Fixed;dy: Fixed;dz: Fixed);
  80. PROCEDURE Line2D(dx: Fixed;dy: Fixed);
  81. PROCEDURE Line3D(dx: Fixed;dy: Fixed;dz: Fixed);
  82. PROCEDURE ViewPort(r: Rect);
  83. PROCEDURE LookAt(left: Fixed;top: Fixed;right: Fixed;bottom: Fixed);
  84. PROCEDURE ViewAngle(angle: Fixed);
  85. PROCEDURE Identity;
  86. PROCEDURE Scale(xFactor: Fixed;yFactor: Fixed;zFactor: Fixed);
  87. PROCEDURE Translate(dx: Fixed;dy: Fixed;dz: Fixed);
  88. PROCEDURE Pitch(xAngle: Fixed);
  89. PROCEDURE Yaw(yAngle: Fixed);
  90. PROCEDURE Roll(zAngle: Fixed);
  91. PROCEDURE Skew(zAngle: Fixed);
  92. PROCEDURE Transform(src: Point3D;VAR dst: Point3D);
  93. FUNCTION Clip3D(src1: Point3D;src2: Point3D;VAR dst1: Point;VAR dst2: Point): INTEGER;
  94. PROCEDURE SetPt3D(VAR pt3D: Point3D;x: Fixed;y: Fixed;z: Fixed);
  95. PROCEDURE SetPt2D(VAR pt2D: Point2D;x: Fixed;y: Fixed);
  96. PROCEDURE LineTo3D(x: Fixed;y: Fixed;z: Fixed);
  97.  
  98.  
  99. {$ENDC}    { UsingGraf3D }
  100.  
  101. {$IFC NOT UsingIncludes}
  102.     END.
  103. {$ENDC}
  104.  
  105.